{extend name="common@base/common" /}

{block name="body"}

		<ul class="tab-nav nav">
		{php}$group_list = config('app.CONFIG_GROUP_LIST');{/php}
		{volist name="group_list" id="group"}
			<li {eq name="id" value="$key"}class="current"{/eq}><a href="{:U('group?id='.$key)}">{$group}配置</a></li>
		{/volist}
		</ul>
		<div class="tab-content">

	<form action="{:U('save')}" method="post" class="form-horizontal layui-form" lay-filter="xw-form">
		{if condition='$id eq 10'}
			<label class="item-label">当前状态：</label>
			{if condition='config("app.IS_QRCODE_LOGIN") eq 1'}
				已开启
			{else/}
				未开启
			{/if}
		{/if}
		{volist name="list" id="config"}
		<div class="form-item">
			<label class="item-label">{$config.title|raw}{if condition="!empty($config['remark'])"}<span class="check-tips">（{$config.remark}）</span>{/if} </label>
			<div class="controls" style="overflow: visible;">
			{switch name="config.type"}
			{case value="0"}
			<input type="text" class="text input-small" name="{$config.name}" value="{$config.value}">
			{/case}
			{case value="1"}
			<input type="text" class="text input-large" name="{$config.name}" value="{$config.value}">
			{/case}
			{case value="2"}
			<label class="textarea input-large">
				<textarea name="{$config.name}">{$config.value}</textarea>
			</label>
			{/case}
			{case value="3"}
			<label class="textarea input-large">
				<textarea name="{$config.name}">{$config.value}</textarea>
			</label>
			{/case}
			{case value="4"}
			<select name="{$config.name}">
				{volist name=":parse_field_attr($config['extra'])" id="vo"}
					<option value="{$key}" {eq name="config.value" value="$key"}selected{/eq}>{$vo}</option>
				{/volist}
			</select>
			{/case}
				{case value="5"}
				<div class="col-sm-8" style="padding-left:0">
					<div class="uploadrow2" data-max="1" title="点击修改图片" rel="{$config.name}">
						<input type="file" id="upload_picture_{$config.name}">
						<input type="hidden" name="{$config.name}" id="cover_id_{$config.name}" value="{$config.value}"/>
						<div class="upload-img-box">
							{notempty name="config.value"}
							<div class="upload-pre-item2"><img width="100" height="100" src="{$config.value|get_cover_url}"/></div>
							<em class="edit_img_icon">&nbsp;</em>
							{/notempty}
						</div>
					</div>
				</div>
				{/case}
			{/switch}

			</div>
		</div>
		{/volist}

		<div class="form-item">
			<label class="item-label"></label>
			<div class="controls">
				{empty name="list"}<button type="submit" disabled class="btn submit-btn disabled" target-form="form-horizontal">确 定</button>{else/}<button type="submit" class="btn submit-btn ajax-post" target-form="form-horizontal">确 定</button>{/empty}

				<button class="btn btn-return submit-btn">返 回</button>
                {notempty name="more_button"}
                    {volist name="more_button" id="vo"}
                        <a class="btn" href="{$vo.url}">{$vo.title}</a>
                    {/volist}
                {/notempty}
			</div>
		</div>
	</form>
			</div>
	</div>
{/block}

{block name="script"}
<script type="text/javascript">
$(function(){
    initUploadImg();
});
</script>
{/block}
